﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CaseReview.Model;

namespace CaseReview.SQLServerDAL
{
    public class BusinessLogic {
        private static BusinessLogic instatnce = null;
        private static Case _case = null;

        private BusinessLogic() {
            _case = new Case();
        }

        public static BusinessLogic GetInstance() {
            if(instatnce == null)
                instatnce = new BusinessLogic();
            return instatnce;
        }

        public IList<CaseInfo> GetTotalCaseByStatus(int status) {
            return _case.GetTotalCaseByStatus(status);
        }

        public void InsertCase(CaseInfo caseInfo) {
            _case.Insert(caseInfo);
        }

        public void UpdateCase(CaseInfo caseInfo,string oldCaseId) {
            _case.UpdateCase(caseInfo,oldCaseId);
        }
    }
}
